package sessionBeans;

import java.io.Serializable;
import java.util.Collection;
import javax.ejb.Remote;

import entityBeans.Ability;
import entityBeans.Comment;
import entityBeans.Helpmeeting;
import entityBeans.Message;
import entityBeans.RequestNotification;
import entityBeans.User;

import objects.AbilityObject;
import objects.CommentObject;
import objects.HelpmeetingObject;
import objects.MessageObject;
import objects.RequestNotificationObject;
import objects.UserObject;

@Remote
public interface AccessRemote {

	//public Serializable register (UserObject userObject) throws BeanException;
	public String register (String name,String surname,String  email,String  city,String  job,String bday,String password, String gender) throws BeanException;
	public Serializable login( String email, String password ) throws BeanException;
	public void logout() throws BeanException;
	public Collection<HelpmeetingObject> getHelpmeetings(User active) throws BeanException;
	public Collection<MessageObject> getMessages(User active) throws BeanException;
	Collection<AbilityObject> getAbilities(User active) throws BeanException;
	Collection<RequestNotificationObject> getNotifications(User active)
			throws BeanException;
	
	//search part and methods
	public Collection<AbilityObject> searchHelp(String keyword) throws BeanException;	
	public Collection<UserObject> searchFriend(String keyword) throws BeanException;
	
	//part related to ability
	void requestAbility(User Active, AbilityObject ability, RequestNotificationObject request)
			throws BeanException;
	void addAbility(User Active, Ability ability) throws BeanException;
	void addHelpmeeting(User Active, Helpmeeting meeting) throws BeanException;
	void sendMessage(User Active, Message message, RequestNotification request)
			throws BeanException;
	void commentOnMeeting(User Active, HelpmeetingObject meeting, Comment comment)
			throws BeanException;
	
	// void addFriend(User user, RequestNotification request) throws BeanException;
	
	
	// request ability check again -||> if you are gonna add one column you should also change getAbilities function
	// addAbility de dusunulecek 
	
	void acceptRejectRequest (User Active, RequestNotification request, boolean flag) throws BeanException;
	Collection<Ability> getAllAbilities() throws BeanException;
	Collection<UserObject> getFriends(User active) throws BeanException;
	void createAbility() throws BeanException;
}